#encoding: utf-8
'''
Created on 2012-9-17

@author: gemini blue
'''
from pub import Func
from pub.Config import Config
class User():    '''
    u'用户模型
    '''
    TABLE_NAME="Sq_UserInfo"
    PRIMARY_KEY="Id"
    USERID="Id"
    USERNAME="UserName"
    USERPASS="UserPass"
    USERLEVEL="UserLevel"
    USERCASH="UserCash"
    USERPHOTO="UserPhoto"
    USERSTATE="UserState"
    USERLOGINPOSX="UserLoginPosX"
    USERLOGINPOSY="UserLoginPosY"
    USEREMAIL="UserEmail"
    USERTEL="UserTel"
    USERAGE="UserAge"
    USERBIRTH="UserBirth"
    USERSIGN="UserSign"
    USERSEX="UserSex"
    USERNICKNAME="UserNickName"
    CREATED="Created"
    USERLASTLOGINIP="UserLastLoginIp"
    USERLASTLOGINTIME="UserLastLoginTime"
    USERISONLINE="UserIsOnline"
    CHECKFLAG="checkFlag"
    SEARCHFLAG="searchFlag"
    USERPROVINCE="UserProvince"
    USERAREA="UserArea"
    def __init__(self):
#        用户编号
        self.__userId = Config.S_SYS_NONE
#        用户名
        self.__userName = Config.S_SYS_NONE
#        密码
        self.__userPass = Config.S_SYS_NONE
#        头像
        self.__userPhoto = Config.S_SYS_NONE
#        用户等级
        self.__userLevel = Config.I_SYS_ONE
#        龙蛋数量
        self.__userCash = Config.I_SYS_ZERO
#        最后一次登录IP
        self.__userLastLoginIp = Config.S_SYS_NONE
#        最后一次登录时间
        self.__userLastLoginTime = Config.I_SYS_ZERO
#        用户状态
        self.__userState = Config.I_SYS_ONE
#        用户登陆时所在经度
        self.__userLoginPosX = Config.I_SYS_ZERO
#        用户登陆时所在纬度
        self.__userLoginPosY = Config.I_SYS_ZERO
#        用户创建时间
        self.__created = Func.getNow()
#        用户连接时的Socket对象
        self.__socket = Config.S_SYS_NONE
#        用户电子邮件
        self.__userEmail = Config.S_SYS_NONE
#        用户昵称
        self.__userNickName = Config.S_SYS_NONE
#        用户联系电话
        self.__userTel = Config.S_SYS_NONE
#        用户年龄
        self.__userAge = Config.S_SYS_NONE
#        用户生日
        self.__userBirth = Config.S_SYS_NONE
#        用户个性签名
        self.__userSign = Config.S_SYS_NONE
#        用户性别
        self.__userSex = Config.S_SYS_NONE
#        用户是否在线
        self.__userIsOnline = Config.I_USER_STATE_ONLINE
#        用户所在房间对象
        self.__userInRoom = Config.S_SYS_NONE
#        当前用户是否是房主 
        self.__userIsRoomOwner = Config.I_USER_NOT_IS_ROOM_OWNER
#        当前用户的游戏状态
        self.__userGameState = Config.I_USER_GAME_STATE_OK
#        当前用户添加好友时是否需要验证
        self.__checkFlag = Config.I_USER_CHECK_FLAG_YES
#        用户新密码
        self.__newPassword = Config.S_SYS_NONE
#        用户所在省份
        self.__userProvince = Config.S_SYS_NONE
#        用户所在地区
        self.__userArea = Config.S_SYS_NONE
#        用户搜索条件
        self.__searchFlag=14
#        用户房间模型
        self.__room = Config.S_SYS_NONE
#        用户是否在房间中
        self.__inroom = Config.I_SYS_ZERO
        
        #当明是不是回答者，True 是
        self.__currentInRoom=False;

    def get_current_in_room(self):
        return self.__currentInRoom


    def set_current_in_room(self, value):
        self.__currentInRoom = value;

        

    def get_room(self):
        return self.__room


    def get_inroom(self):
        return self.__inroom


    def set_room(self, value):
        self.__room = value


    def set_inroom(self, value):
        self.__inroom = value

    def get_check_flag(self):
        return self.__checkFlag


    def get_search_flag(self):
        return self.__searchFlag


    def set_check_flag(self, value):
        self.__checkFlag = value


    def set_search_flag(self, value):
        self.__searchFlag = value


    def get_user_province(self):
        return self.__userProvince


    def get_user_area(self):
        return self.__userArea


    def set_user_province(self, value):
        self.__userProvince = value


    def set_user_area(self, value):
        self.__userArea = value

    def get_new_password(self):
        return self.__newPassword


    def set_new_password(self, value):
        self.__newPassword = value

        
    def get_user_id(self):
        return self.__userId


    def get_user_name(self):
        return self.__userName


    def get_user_pass(self):
        return self.__userPass


    def get_user_photo(self):
        return self.__userPhoto


    def get_user_level(self):
        return self.__userLevel


    def get_user_cash(self):
        return self.__userCash


    def get_user_last_login_ip(self):
        return self.__userLastLoginIp


    def get_user_last_login_time(self):
        return self.__userLastLoginTime


    def get_user_state(self):
        return self.__userState


    def get_user_login_pos_x(self):
        return self.__userLoginPosX


    def get_user_login_pos_y(self):
        return self.__userLoginPosY


    def get_created(self):
        return self.__created


    def get_socket(self):
        return self.__socket


    def get_user_email(self):
        return self.__userEmail


    def get_user_nick_name(self):
        return self.__userNickName


    def get_user_tel(self):
        return self.__userTel


    def get_user_age(self):
        return self.__userAge


    def get_user_birth(self):
        return self.__userBirth


    def get_user_sign(self):
        return self.__userSign


    def get_user_sex(self):
        return self.__userSex


    def get_user_is_online(self):
        return self.__userIsOnline


    def get_user_in_room(self):
        return self.__userInRoom


    def get_user_is_room_owner(self):
        return self.__userIsRoomOwner


    def get_user_game_state(self):
        return self.__userGameState


    def set_user_id(self, value):
        self.__userId = value


    def set_user_name(self, value):
        self.__userName = value


    def set_user_pass(self, value):
        self.__userPass = value


    def set_user_photo(self, value):
        self.__userPhoto = value


    def set_user_level(self, value):
        self.__userLevel = value


    def set_user_cash(self, value):
        self.__userCach = value


    def set_user_last_login_ip(self, value):
        self.__userLastLoginIp = value


    def set_user_last_login_time(self, value):
        self.__userLastLoginTime = value


    def set_user_state(self, value):
        self.__userState = value


    def set_user_login_pos_x(self, value):
        self.__userLoginPosX = value


    def set_user_login_pos_y(self, value):
        self.__userLoginPosY = value


    def set_created(self, value):
        self.__created = value


    def set_socket(self, value):
        self.__socket = value


    def set_user_email(self, value):
        self.__userEmail = value


    def set_user_nick_name(self, value):
        self.__userNickName = value


    def set_user_tel(self, value):
        self.__userTel = value


    def set_user_age(self, value):
        self.__userAge = value


    def set_user_birth(self, value):
        self.__userBirth = value


    def set_user_sign(self, value):
        self.__userSign = value


    def set_user_sex(self, value):
        self.__userSex = value


    def set_user_is_online(self, value):
        self.__userIsOnline = value


    def set_user_in_room(self, value):
        self.__userInRoom = value


    def set_user_is_room_owner(self, value):
        self.__userIsRoomOwner = value


    def set_user_game_state(self, value):
        self.__userGameState = value
    room = property(get_room, set_room, None, None)
    inroom = property(get_inroom, set_inroom, None, None)
    currentInRoom = property(get_current_in_room, set_current_in_room, None, None)

        
